﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="StockSearch.aspx.cs" Inherits="Report_StockSearch" %>

<%@ Register Src="../Storage/Position.ascx" TagName="Position" TagPrefix="uc1" %>
<%--<%@ Register Src="../CommonService/SystemUser.ascx" TagName="SystemUser" TagPrefix="uc2" %>--%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>库存总览</title>
    <link href="../css/css.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        .find td {
            border-bottom: 1px solid #b5d6e6;
            border-right: 1px solid #b5d6e6;
            /*border-left: 1px solid #b5d6e6;*/
        }
        .auto-style1 {
            width: 70px;
            height: 30px;
        }
        .auto-style2 {
            width: 170px;
            height: 30px;
        }
        .auto-style3 {
            width: 160px;
            height: 30px;
        }
        .auto-style4 {
            width: 80px;
            height: 30px;
        }
        .auto-style5 {
            width: 350px;
            height: 30px;
        }
    </style>
    <script type="text/javascript">
        window.onload = function () {
            var a = document.getElementById("loading");
            a.parentNode.removeChild(a);
        }
        document.write('<div id="loading" style="line-height:122px;"><table cellpadding="0" width="100%"><Tr><Td align="center" height="500" valign="middle"><img src="../images/loading.gif"></td></tr></table></div>');
    </script>



</head>
<body>
    <form id="form1" runat="server">
        <div>
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                    <td style="height: 30px" valign="top">
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                                <td style="background-image: url(../images/tab_03.gif); background-repeat: repeat-x; width: 12px;">&nbsp;
                                </td>
                                <td style="background-image: url(../images/tab_05.gif); background-repeat: repeat-x; height: 30px;">
                                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                        <tr>
                                            <td style="width: 46%; vertical-align: middle;">
                                                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                    <tr>
                                                        <td style="width: 5%; vertical-align: middle;">
                                                            <img src="../images/tb.gif" width="16" height="16" />
                                                        </td>
                                                        <td style="width: 95%;">
                                                            <span>你当前的位置</span>：报表管理-库存总览
                                                        </td>
                                                    </tr>
                                                </table>
                                            </td>
                                            <td width="54%"></td>
                                        </tr>
                                    </table>
                                </td>
                                <td width="16" style="background-image: url(../images/tab_07.gif); height: 30px;">&nbsp;
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td valign="top">
                        <table width="100%" border="0" cellspacing="0" cellpadding="0" >
                            <tr>
                                <td style="background-image: url(../images/tab_12.gif); width: 8px;">&nbsp;
                                </td>
                                <td>
                                    <table width="100%" border="0" cellspacing="0" cellpadding="0" style="border: 1px solid #b5d6e6;">
                                        <tr >
                                            <td>
                                                <table width="100%" cellspacing="0" cellpadding="0" class="find">
                                                    <tr>
                                                        <td align="right" class="auto-style1">物料编号：
                                                        </td>
                                                        <td style="padding-left:2px;" class="auto-style2">
                                                            <asp:TextBox ID="txtMat_Code" runat="server" Style="width: 150px; height: 14px; border: solid 1px #b5d6e6; font-size: 9pt;"></asp:TextBox>
                                                        </td>
                                                        <td align="right" class="auto-style1">物料名称：
                                                        </td>
                                                        <td style="padding-left:2px;" class="auto-style2">
                                                            <asp:TextBox ID="txtMat_Name" runat="server" Style="width: 150px; height: 14px; border: solid 1px #b5d6e6; font-size: 9pt;"></asp:TextBox>
                                                        </td>
                                                        <td align="right" class="auto-style1">托盘号：
                                                        </td>
                                                        <td style="padding-left:2px;" class="auto-style3">
                                                            <asp:TextBox ID="txtTray_ID" runat="server" Style="width: 150px; height: 14px; border: solid 1px #b5d6e6; font-size: 9pt;"></asp:TextBox>
                                                        </td>
                                                        
                                                        <%--<td style="width: 350px; padding-top: 1px;">
                                                        <uc1:Position ID="Position1" runat="server" />
                                                    </td>--%>
                                                        <td style="padding-top: 1px;" class="auto-style5">
                                                            <uc1:Position ID="Position1" runat="server" />
                                                        </td>

                                                    </tr>
                                                      <tr>
                                                        <td style="width: 100px; height: 30px;" align="right">生产通知单：
                                                        </td>
                                                        <td style="width: 170px;padding-left:2px;">
                                                            <asp:TextBox ID="txt_TS01" runat="server" Style="width: 150px; height: 14px; border: solid 1px #b5d6e6; font-size: 9pt;"></asp:TextBox>
                                                        </td>
                                                          <td align="right" class="auto-style4">低于限值：
                                                        </td>
                                                        <td style="padding-left:2px;" class="auto-style2">

                                                            <asp:DropDownList ID="DDLMiniNum" runat="server" Style="width: 100px; height: 22px; border: solid 1px #b5d6e6; padding-left: 2px; font-size: 9pt;">
                                                                <asp:ListItem Selected="True" Value="0">--选择--</asp:ListItem>
                                                                <asp:ListItem Value="10">是</asp:ListItem>
                                                            </asp:DropDownList>
                                                        </td>
                                                           <td style="padding-top: 1px;padding-left:3px;" align="left" colspan="5">
                                                            <asp:ImageButton ImageUrl="../images/btn/btn_Search.gif" Width="63" ID="ImageButton1"
                                                                runat="server" OnClick="ibtnSearch_Click" />&nbsp;&nbsp; &nbsp; &nbsp; 
                                                        <asp:ImageButton ImageUrl="../images/btn/btn_Excel.gif" Width="65" ID="ImageButton2"
                                                            runat="server" OnClick="ibtnExcel_Click" />&nbsp;&nbsp; &nbsp; &nbsp;
                                                            <asp:ImageButton ID="ImageButton3" runat="server" ImageUrl="~/Images/btn/btn_Reset.gif"
                                                                Width="63" OnClick="btnReset_Click" />
                                                        </td>
                                                          </tr>
                                                </table>
                                      <%--          <table width="100%" cellspacing="0" cellpadding="0" style="border-bottom: 1px solid #b5d6e6;">
                                                    <tr>
                                                        <td style="padding-top: 1px;" align="center">
                                                            <asp:ImageButton ImageUrl="../images/btn/btn_Search.gif" Width="63" ID="ibtnSearch"
                                                                runat="server" OnClick="ibtnSearch_Click" />&nbsp;&nbsp; &nbsp; &nbsp; 
                                                        <asp:ImageButton ImageUrl="../images/btn/btn_Excel.gif" Width="65" ID="ibtnExcel"
                                                            runat="server" OnClick="ibtnExcel_Click" />&nbsp;&nbsp; &nbsp; &nbsp;
                                                            <asp:ImageButton ID="btnReset" runat="server" ImageUrl="~/Images/btn/btn_Reset.gif"
                                                                Width="63" OnClick="btnReset_Click" />
                                                        </td>
                                                    </tr>
                                                </table>--%>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="padding: 2px;">
                                                <table cellpadding="0" cellspacing="0" border="0" width="100%">
                                                    <tr>
                                                        <td align="left" id="hei" valign="top">
                                                            <div id="heidiv" style="margin-left: 0px; margin-top: 3px; width: 100%; height: 580px; overflow-x: auto; overflow-y: auto">

                                                                <script language="JavaScript" type="text/javascript">
                                                                    function idheight() {
                                                                        var vheight = document.documentElement.clientHeight - 136;
                                                                        document.getElementById("hei").style.height = vheight;
                                                                        document.getElementById("heidiv").style.height = vheight - 10;
                                                                        setTimeout(function () { idheight(); }, 10);
                                                                    }
                                                                    idheight();
                                                                </script>


                                                                <asp:GridView ID="gv" runat="server" AutoGenerateColumns="False" Width="99%" BorderWidth="1px"
                                                                    BorderColor="#B5D6E6" CellPadding="0" AllowPaging="True"
                                                                    OnRowDataBound="gv_RowDataBound" PageSize="100"
                                                                    OnPageIndexChanging="gv_PageIndexChanging" Style="margin-top: 5px">
                                                                    <%--<PagerStyle CssClass="dg_pager" />--%>
                                                                    <Columns>
                                                                        <asp:TemplateField HeaderText="编号">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="labCodeType" runat="server" Text="<%#Container.DataItemIndex+1%>"></asp:Label>
                                                                            </ItemTemplate>
                                                                            <ItemStyle Width="8%" />
                                                                        </asp:TemplateField>
                                                                        <asp:BoundField DataField="Mat_Code" HeaderText="物料编码">
                                                                            <ItemStyle Width="8%" />
                                                                        </asp:BoundField>
                                                                        <asp:BoundField DataField="Mat_Name" HeaderText="物料名称">
                                                                            <ItemStyle Width="10%" HorizontalAlign="center" Font-Bold="True" />
                                                                        </asp:BoundField>
                                                                        <asp:BoundField DataField="Mat_Num1" HeaderText="总数量">
                                                                            <ItemStyle Width="8%" HorizontalAlign="center" />
                                                                        </asp:BoundField>
                                                                        <asp:BoundField DataField="MiniNum" HeaderText="最低限值">
                                                                            <ItemStyle Width="8%" HorizontalAlign="center" />
                                                                        </asp:BoundField>
                                                                        <asp:BoundField DataField="TS01" HeaderText="生产通知单号">
                                                                            <ItemStyle Width="10%" />
                                                                        </asp:BoundField>
                                                                             <asp:BoundField DataField="S01" HeaderText="规格">
                                                                            <ItemStyle Width="10%" />
                                                                        </asp:BoundField>
                                                                           <asp:BoundField DataField="TM01" HeaderText="材质">
                                                                            <ItemStyle Width="6%" />
                                                                        </asp:BoundField>
                                                                           <asp:BoundField DataField="TM03" HeaderText="长度">
                                                                             <ItemStyle Width="6%" />
                                                                        </asp:BoundField>
                                                                          <asp:BoundField DataField="S02" HeaderText="备注">
                                                                             <ItemStyle Width="22%" />
                                                                        </asp:BoundField>
                                                                        <asp:BoundField DataField="Unit_Base" HeaderText="单位">
                                                                            <ItemStyle Width="6%" />
                                                                        </asp:BoundField>
                                                                        <asp:TemplateField HeaderText="安全库存量" Visible="false">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="lblN01" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "N01")%>'></asp:Label>
                                                                            </ItemTemplate>
                                                                            <ItemStyle Width="50" />
                                                                        </asp:TemplateField>
                                                                    </Columns>
                                                                    <HeaderStyle HorizontalAlign="Center" CssClass="gvHeader" />
                                                                    <RowStyle CssClass="gvRow" HorizontalAlign="Center" />
                                                                </asp:GridView>
                                                            </div>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                                <td style="background-image: url(../images/tab_15.gif); width: 8px;">&nbsp;
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td style="background-image: url(../images/tab_19.gif); height: 35px;">
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                                <td style="width: 12px; height: 35px;">
                                    <img src="../images/tab_18.gif" width="12" height="35" />
                                </td>
                                <td>&nbsp;
                                </td>
                                <td width="16">
                                    <img src="../images/tab_20.gif" width="16" height="35" />
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
        </div>
    </form>
</body>
</html>
